home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5886 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: odin.diku.dk!zznyyd
  2. From: zznyyd@diku.dk (Finn Nielsen)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Sorting a list
  5. Date: 21 Mar 1996 11:19:08 GMT
  6. Organization: Department of Computer Science, U of Copenhagen
  7. Sender: zznyyd@berling.diku.dk
  8. Distribution: world
  9. Message-ID: <ZZNYYD.96Mar21121908@diku.dk>
  10. References: <272.6650T63T1340@sn.no> <314F9F68.48E2@sapiens.com>
  11. Reply-To: zznyyd@diku.dk
  12. NNTP-Posting-Host: odin.diku.dk
  13. In-reply-to: Avi Lev's message of Wed, 20 Mar 1996 08:02:16 +0200
  14.  
  15.  
  16. In article <314F9F68.48E2@sapiens.com> Avi Lev <avil@sapiens.com> writes:
  17. > Christopher Naas wrote:
  18. > > 
  19. > > What's the absolutely fastest algorithm for sorting a List with around 1000
  20. > > items alphabetically?
  21. > > 
  22. > well, the fastest way is no doubt, bubble sort!!! but you have to perform the sort on a 
  23. > list of pointers to the strings not on the strings themselves otherwise it'll be slower.
  24.  
  25. I really hope you're just kidding here: bubble sort is the slowest sorting
  26. algorithm ever. ALTO you're right about sorting the pointers instead of the
  27. actual strings. I recommend using QuickSort for sorting the pointers and
  28. natural merge sort if you're using linked lists...
  29.  
  30. -- 
  31. /-ZzNyYd! Design.--------------------Statement: Perhaps the world exists...-\
  32.  Finn Nielsen <zznyyd@diku.dk>  -   WWW: http://www.diku.dk/students/zznyyd/
  33.  (Student) Department of Computer Science, University of Copenhagen, Denmark
  34. \-PGP: ID=AB1AB0AD Fingerpr=58EC5501A99C0B40E1943FDACC239217--Pulven Rulez!-/
  35.